package com.example.caiyu.Service.impl;

import com.example.caiyu.Mapper.CommodityManagerMapper;
import com.example.caiyu.Pojo.Commodity;
import com.example.caiyu.Service.CommodityManagerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class CommodityManagerServiceImpl implements CommodityManagerService {
    @Autowired
    private CommodityManagerMapper commodityManagerMapper;
    @Override
    public void publishCommodity(Commodity commodity) {
        // 实现发布商品的逻辑
        commodityManagerMapper.publishCommodity(commodity);
    }
    @Override
    public Integer getCommodityCount() {
        // 实现获取商品数量的逻辑
        int count = commodityManagerMapper.getCommodityCount();
        return count;
    }
}

